package day3;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class JiaoWuTest {
    public static void main(String[] args) {
        Jiaowuchu j=new Jiaowuchu();
        j.name="科大教务处";

        Scanner in=new Scanner(System.in);
        System.out.print("请输入姓名：");
        String stuName=in.next();
        System.out.println("三门课成绩：");
        float java=in.nextFloat();
        float sql=in.nextFloat();
        float csharp=in.nextFloat();
        float avg = j.calcAvg(stuName,java, sql, csharp);
        System.out.println("成绩如下：java:"+java+",sql:"+sql+",c#:"+csharp);
        System.out.println("平均分："+avg);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>");
        Student wang=new Student();
        System.out.println("请输入他的名字：");
        wang.name=in.next();
        System.out.println("三门课的成绩：");
        wang.java=in.nextFloat();
        wang.sql=in.nextFloat();
        wang.csharp=in.nextFloat();
        float avg2=j.calcAvg2(wang);//!!!
        System.out.println("在main中");
        wang.show();//真的改了。。。
        System.out.println(wang.name+"的平均分是："+avg2);
    }
}
